<?php 
//======================================
include("../../mainfile.php");

//configura os caminhos para usar no html ===================
$playlist = XOOPS_URL . '/modules/mp3player/mp3xml.php';
$iframe_url = XOOPS_URL . "/modules/mp3player/mp3home.php";
if   (isset($_GET['playlist']))  { $playlist .= '?playlist=' . $_GET['playlist']; $iframe_url = XOOPS_URL . "/modules/mp3player/mp3playlist.php?id=" . $_GET['playlist'];}
else if (isset($_GET['musica'])) { $playlist .= '?musica=' . $_GET['musica']; $iframe_url = XOOPS_URL . "/modules/mp3player/mp3music.php?id=" . $_GET['musica'];}
else if (isset($_GET['genero'])) { $playlist .= '?genero=' . $_GET['genero']; $iframe_url = XOOPS_URL . "/modules/mp3player/mp3genero.php?id=" . $_GET['genero'];}
$swf_url = XOOPS_URL . '/modules/mp3player/swf/mp3player.swf?autostart=true&amp;playlist=' . $playlist;
$swf_obj = '<object data="' . $swf_url . '" type="application/x-shockwave-flash" width="290" height="200" ><param name="movie" value="' . $swf_url . '" /></object>';
//===========================================================

include_once XOOPS_ROOT_PATH.'/class/template.php';
$tpl = new XoopsTpl();
$tpl->assign('swf_obj', $swf_obj); 
$tpl->assign('iframe_url', $iframe_url); 
$tpl->assign('lang_mp3_close_msg', _MI_MP3PLAYER_MSG_CLOSE); 
$tpl->display('db:mp3player_player.html');
//======================================
?>